package LOGISTICS;



import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class test005_pattern_matcher {

	public static void main(String[] args) {
		String str = "1SR154-400P        0018002046A001P2008                              ";

//		Pattern pattern = Pattern.compile("(?<=@1P)[^@]*(?=@)");
		Pattern pattern = Pattern.compile("[^ ]*");
//		Pattern pattern = Pattern.compile("(?<=\\s\\S{10}).+(?=\\S{3})");
		Matcher matcher = pattern.matcher(str);
		if (matcher.find()) {
			String collegeId = matcher.group();
			System.out.println(collegeId);//14000
		}
//		pattern = Pattern.compile("(?<=.{3}).{7}");
//		matcher = pattern.matcher(str );
//		if (matcher.find()) {
//			String collegeId = matcher.group();
//			System.out.println(collegeId);//14000
//		}
	}

}
